import Vue from 'vue'
import VueRouter from 'vue-router'


import Index from '../views/Index'
import Home from '../views/Home.vue'


Vue.use(VueRouter)

const routes = [
    {
        path: '/',
        redirect: '/Index'
    },
    {
        path: '/Index',
        // 不需要重定向
        // name: 'Index',
        component: Index
    },
    {
        path: '/Home',
        component: Home,
        children: [
            {
                path: ""
            }
        ]
    }
]

const router = new VueRouter({
    // mode: hash,
    base: process.env.BASE_URL,
    routes
})

export default router